package org.stu.dto;

import java.util.*;

public class User {
	private Integer id;
	private String name;
	private String password;
	private String email;
	private String address;
	private String desc;
	private UserType userType;
	private Set expenses=new HashSet();
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public UserType getUserType() {
		return userType;
	}
	public void setUserType(UserType userType) {
		this.userType = userType;
	}
    public Set getExpenses() {
		return expenses;
	}
	public void setExpenses(Set expenses) {
		this.expenses = expenses;
	}
	
	public boolean equals(Object obj) { 
		if (this == obj) 
		return true; 
		if (obj == null) 
		return false; 
		if (getClass() != obj.getClass()) 
		return false; 
		final User other = (User) obj; 
		if (this.name != other.name) 
		return false; 
		return true; 
		}


	public int hashCode(){  
        return this.name.hashCode()+this.email.hashCode();
    } 

}
